import  * as VueRouter  from "vue-router";
import { close, start } from '../components/nprogress/nprogress.ts';

const routes:any = [
    {
        path: '/admin', component: () => import('../views/admin/layout.vue'),
        children:[
            {
                path: '/admin/public',name:'publics',role:'publics',meta:{is_more:true,side_name:'企业公示',is_show:true,img:'',disabled:false},
                children:[
                    { path: '/admin/public',name:'public',role:'1',meta:{side_name:'企业公示',is_show:true},component: () => import('../views/admin/apply/public.vue')},
                    { path: '/admin/public/list/:type',name:'publicList',role:'1',meta:{side_name:'企业公示列表',is_show:false},component: () => import('../views/admin/apply/publicList.vue')},
                ]
            },

            {
                path: '/admin/approves',name:'approves',role:'approves',meta:{is_more:true,side_name:'审批流程',is_show:true,img:'',disabled:false},
                children:[
                    { path: '/admin/approve',name:'approve',role:'1',meta:{side_name:'审批流程',is_show:true},component: () => import('../views/admin/apply/index.vue')},
                    { path: '/admin/warning/cert/warning',name:'warningCertWarning',role:'1',meta:{side_name:'证书延期预警',is_show:true}, component: () => import('../views/admin/comprehensive/cert_warning.vue') },

                ]
            },

            {
                path: '/admin/applys',name:'applys',role:'applys',meta:{is_more:true,side_name:'报告申请',is_show:true,img:'',disabled:false},
                children:[
                    
                    { path: '/admin/apply',name:'apply',role:'1',meta:{is_more:false,side_name:'用章申请',is_show:true},component: () => import('../views/admin/apply/stamp.vue')},
                    { path: '/admin/apply/down',name:'applyDown',role:'3',meta:{s_more:false,side_name:'资料下载申请',is_show:true},component: () => import('../views/admin/apply/down.vue')},
                    // { path: '/admin/apply/pay',name:'appliyPay',role:'1',meta:{side_name:'付款申请',is_show:true}, component: () => import('../views/admin/apply/pay.vue') },
                    { path: '/admin/apply/imprest',name:'applyImprest',role:'4',meta:{s_more:false,side_name:'备用金申请',is_show:true},component: () => import('../views/admin/apply/imprest.vue')},
                    { path: '/admin/apply/leave',name:'applyLeave',role:'3',meta:{s_more:false,side_name:'请假单',is_show:true},component: () => import('../views/admin/apply/leave.vue')},
                    { path: '/admin/apply/suggest',name:'applySuggest',role:'4',meta:{s_more:false,side_name:'合理化建议',is_show:true},component: () => import('../views/admin/apply/suggest.vue')},
                    { path: '/admin/apply/other',name:'applyOther',role:'4',meta:{s_more:false,side_name:'通用报告申请',is_show:true},component: () => import('../views/admin/apply/other.vue')},
                ]
            },
    
            {
                path: '/admin/marketing',name:'marketings',role:'marketings',meta:{is_more:true,side_name:'营销投标管理中心',is_show:true,img:'',disabled:true},
                children:[
                    { path: '/admin/marketing',name:'marketing',role:'1',meta:{side_name:'营销战略中心',is_show:true}},
                    { path: '/admin/marketing/bid',name:'marketingBid',role:'2',meta:{side_name:'投标管理中心',is_show:true}},
                ]
            },
            {
                path: '/admin/design',name:'designs',role:'designs',meta:{is_more:true,side_name:'设计研发中心',is_show:true,img:'',disabled:false},
                children:[
                    { path: '/admin/design',name:'design',role:'1',meta:{side_name:'技术研发创新',is_show:true}, component: () => import('../views/admin/design/index.vue')},
                    { path: '/admin/design/delegate',name:'designDelegate',role:'2',meta:{side_name:'委派技术团队',is_show:true}},
                    { path: '/admin/design/project',name:'designsProject',role:'3',meta:{side_name:'设计项目',is_show:true}},
                ]
            },
            {
                path: '/admin/supplier',name:'suppliers',role:'suppliers',meta:{is_more:true,side_name:'供应商资源库',is_show:true,img:'',disabled:false},
                children:[
                    { path: '/admin/supplier',name:'supplier',role:'1',meta:{side_name:'供应商入库',is_show:true}, component: () => import('../views/admin/supplier/supplier.vue')},
                    { path: '/admin/supplier/edit/:id',name:'supplierEdit',role:'2',meta:{side_name:'供应商入库',is_show:false}, component: () => import('../views/admin/supplier/edit.vue') },
                    { path: '/admin/supplier/teams',name:'supplierTeams',role:'2',meta:{side_name:'班组商入库',is_show:true}, component: () => import('../views/admin/supplier/teams.vue')},
                    { path: '/admin/supplier/teams/edit/:id',name:'teamsEdit',role:'2',meta:{side_name:'班组商入库',is_show:false}, component: () => import('../views/admin/supplier/teamsEdit.vue') },
                    {
                        path: '/admin/reference',name:'reference',role:'2',meta:{is_more:true,side_name:'企业指导价',is_show:true},
                        children:[
                            { path: '/admin/reference/material',name:'referenceMaterial',role:'5',meta:{side_name:'材料企业指导价',is_show:true}, component: () => import('../views/admin/reference/material.vue') },
                            { path: '/admin/reference/material/edit/:id',name:'referenceMaterialEdit',role:'2',meta:{side_name:'供应商入库',is_show:false}, component: () => import('../views/admin/reference/edit.vue') },
                            { path: '/admin/reference/manual',name:'referenceManual',role:'6',meta:{side_name:'人工企业指导价',is_show:true}, component: () => import('../views/admin/reference/manual.vue') },
                            { path: '/admin/reference/manual/edit/:id',name:'referenceManualEdit',role:'2',meta:{side_name:'供应商入库',is_show:false}, component: () => import('../views/admin/reference/manualEdit.vue') },
                        ]
                    },
                    
                ]
            },
            {
                path: '/admin/engineering',name:'engineerings',role:'engineerings',meta:{is_more:true,side_name:'项目管理',is_show:true,img:'',disabled:false},
                children:[
                    { path: '/admin/projects',name:'project',role:'1',meta:{side_name:'项目列表',is_show:true}, component: () => import('../views/admin/projects/index.vue') },
                    { path: '/admin/role',name:'role',role:'1',meta:{side_name:'组建项目部',is_show:true}, component: () => import('../views/admin/user/role.vue') },
                    { path: '/admin/projects/edit/:id',name:'projectEdit',role:'2',meta:{side_name:'项目编辑',is_show:false}, component: () => import('../views/admin/projects/edit.vue') },
                    { path: '/admin/projects/info/:id',name:'projectInfo',role:'2',meta:{side_name:'项目详情',is_show:false}, component: () => import('../views/admin/projects/info.vue') },
                    { path: '/admin/projects/invoice',name:'projectInvoice',role:'1',meta:{side_name:'甲方开票申请',is_show:false}, component: () => import('../views/admin/projects/invoice.vue') },
                    { path: '/admin/projects/editInvoice/:id',name:'projectInvoiceEdit',role:'2',meta:{side_name:'甲方开票申请',is_show:false}, component: () => import('../views/admin/projects/editInvoice.vue') },
                    {
                        path: '/admin/prophase',name:'prophases',role:'prophases',meta:{is_more:true,side_name:'项目前期策划',is_show:false,img:''},
                        children:[
                            { path: '/admin/projects/difficulty',name:'projectDifficulty',role:'5',meta:{side_name:'工期,重难点措施',is_show:false}, component: () => import('../views/admin/projects/difficulty.vue') },
                            { path: '/admin/projects/risk',name:'projectRiks',role:'6',meta:{side_name:'资金,法律风险措施',is_show:false}, component: () => import('../views/admin/projects/risk.vue') },
                        ]
                    },
                    {
                        path: '/admin/adjust',name:'adjusts',role:'adjusts',meta:{is_more:true,side_name:'动态调整项目策划',is_show:false,img:''},
                        children:[]
                    },
                    {
                        path: '/admin/construction_contract',name:'construction_contracts',role:'construction_contracts',meta:{is_more:false,side_name:'业主合同',is_show:false,img:''},
                        children:[]
                    },
                    {
                        path: '/admin/letters_responsibility',name:'Letters_responsibilitys',role:'letters_responsibilitys',meta:{is_more:true,side_name:'内部经营协议',is_show:false,img:''},
                        children:[]
                    },
                    {
                        path: '/admin/schedule',name:'schedules',role:'schedules',meta:{is_more:true,side_name:'施工组织计划',is_show:false,img:''},
                        children:[
                            { path: '/admin/schedule',name:'schedule',role:'1',meta:{side_name:'业主施工进度计划',is_show:true}, component: () => import('../views/admin/schedule/index.vue') },
                            // { path: '/admin/schedule/type',name:'scheduleType',role:'2',meta:{side_name:'进度类别',is_show:true}, component: () => import('../views/admin/schedule/type.vue') },
                            // { path: '/admin/schedule/review',name:'scheduleReview',role:'3',meta:{side_name:'进度审核',is_show:true}, component: () => import('../views/admin/schedule/review.vue') },
                            // { path: '/admin/schedule/statistics',name:'scheduleStatistics',role:'4',meta:{side_name:'进度概况',is_show:true}, component: () => import('../views/admin/schedule/statistics.vue') },
                        ]
                    },
                    {
                        path: '/admin/scene',name:'scenes',role:'scenes',meta:{is_more:true,side_name:'现场施工管理',is_show:false,img:''},
                        children:[
                            { path: '/admin/scene/diary',name:'diary',role:'1',meta:{side_name:'现场施工日记',is_show:true}, component: () => import('../views/admin/scene/diary.vue')},
                            { path: '/admin/scene/statistics',name:'sceneStatistics',role:'1',meta:{side_name:'现场用工统计',is_show:true}, component: () => import('../views/admin/scene/statistics.vue')},

                            { path: '/admin/scene/disclosure',name:'disclosure',role:'1',meta:{side_name:'技术交底',is_show:true}, component: () => import('../views/admin/disclosure/index.vue') },
                            { path: '/admin/scene/disclosure/edit/:id',name:'disclosureEdit',role:'2',meta:{side_name:'技术交底',is_show:false}, component: () => import('../views/admin/disclosure/edit.vue') },
                            // { path: '/admin/scene/disclosure/hazard',name:'disclosureHazard',role:'1',meta:{side_name:'质量缺陷排查',is_show:true}, component: () => import('../views/admin/disclosure/hazard.vue') },
                            
                            { path: '/admin/scene/safe',name:'safe',role:'1',meta:{side_name:'安全交底',is_show:true}, component: () => import('../views/admin/safe/index.vue') },
                            // { path: '/admin/scene/safe/hazard',name:'safeHazard',role:'1',meta:{side_name:'安全隐患排查',is_show:true}, component: () => import('../views/admin/safe/hazard.vue') },
                            
                            { path: '/admin/scene/warehouse',name:'warehouse',role:'1',meta:{side_name:'库存管理',is_show:true}, component: () => import('../views/admin/warehouse/index.vue') },
                            // { path: '/admin/scene/warehouse/in',name:'warehouseIn',role:'2',meta:{side_name:'入库管理',is_show:true}, component: () => import('../views/admin/warehouse/ins.vue') },
                            // { path: '/admin/scene/warehouse/out',name:'warehouseOut',role:'3',meta:{side_name:'出库管理',is_show:true}, component: () => import('../views/admin/warehouse/outs.vue') },
                        ]
                    },
                    
                    {
                        path: '/admin/material',name:'materials',role:'materials',meta:{is_more:true,side_name:'材料管理',is_show:false,img:''},
                        children:[
                            { path: '/admin/material',name:'material',role:'1',meta:{side_name:'主料采购清单',is_show:true}, component: () => import('../views/admin/material/index.vue') },
                            { path: '/admin/material/edit/:type/:id',name:'materialEdit',role:'3',meta:{side_name:'材料采购',is_show:false}, component: () => import('../views/admin/material/edit.vue') },
                            { path: '/admin/material/info/:id',name:'materialInfo',role:'3',meta:{side_name:'材料采购单',is_show:false}, component: () => import('../views/admin/material/editInfo.vue') },
                            { path: '/admin/material/contrast',name:'materialContrast',role:'4',meta:{side_name:'询价比价方案结果',is_show:true}, component: () => import('../views/admin/material/contrast.vue') },
                            // { path: '/admin/material/contrast/edit/:id',name:'materialEditContrast',role:'3',meta:{side_name:'询价比价方案结果',is_show:false}, component: () => import('../views/admin/material/editContrast.vue') },
                            { path: '/admin/material/contract',name:'materialContract',role:'4',meta:{side_name:'签订材料采购合同',is_show:true}, component: () => import('../views/admin/material/contract.vue') },
                            { path: '/admin/material/contract/edit/:id',name:'materialEditContract',role:'3',meta:{side_name:'签订材料采购合同',is_show:false}, component: () => import('../views/admin/material/editContract.vue') },
                            { path: '/admin/material/payApply',name:'materialPayApply',role:'4',meta:{side_name:'提交材料付款申请',is_show:true}, component: () => import('../views/admin/material/payApply.vue') },
                            { path: '/admin/material/template',name:'materialTemplate',role:'3',meta:{side_name:'材料采购合同',is_show:true}, component: () => import('../views/admin/material/materialTemplate.vue') },
                            { path: '/admin/material/auth',name:'materialAuth',role:'3',meta:{side_name:'授权委托书',is_show:true}, component: () => import('../views/admin/material/materialAuth.vue') },
                            { path: '/admin/material/clearing',name:'materialClearing',role:'3',meta:{side_name:'清账承诺书',is_show:true}, component: () => import('../views/admin/material/materialClearing.vue') },
                            { path: '/admin/material/delivery/:id',name:'materialDelivery',role:'3',meta:{side_name:'送货单',is_show:false}, component: () => import('../views/admin/material/delivery.vue') },
                            { path: '/admin/material/inform',name:'materialInform',role:'3',meta:{side_name:'告知函',is_show:true}, component: () => import('../views/admin/material/materialInform.vue') },
                        ]
                    },
                    // {
                    //     path: '/admin/disclosure',name:'disclosures',role:'disclosures',meta:{is_more:true,side_name:'技术工艺交底',is_show:true,img:''},
                    //     children:[
                    //         { path: '/admin/disclosure',name:'disclosure',role:'1',meta:{side_name:'技术工艺交底',is_show:true}, component: () => import('../views/admin/disclosure/index.vue') },
                    //         { path: '/admin/disclosure/edit/:id',name:'disclosureEdit',role:'2',meta:{side_name:'技术交底',is_show:false}, component: () => import('../views/admin/disclosure/edit.vue') },
                    //         { path: '/admin/disclosure/type',name:'disclosureType',role:'3',meta:{side_name:'技术交底类别',is_show:true}, component: () => import('../views/admin/disclosure/type.vue') },
                    //     ]
                    // },
                    // {
                    //     path: '/admin/safe',name:'safes',role:'safes',meta:{is_more:true,side_name:'安全文明交底',is_show:true,img:''},
                    //     children:[
                    //         { path: '/admin/safe',name:'safe',role:'1',meta:{side_name:'安全文明列表',is_show:true}, component: () => import('../views/admin/safe/index.vue') },
                    //         { path: '/admin/safe/type',name:'safeType',role:'2',meta:{side_name:'安全文明类别',is_show:true}, component: () => import('../views/admin/safe/type.vue') },
                    //         { path: '/admin/safe/notify',name:'safeNotify',role:'3',meta:{side_name:'通报流程',is_show:true}, component: () => import('../views/admin/safe/notify.vue') },
                    //         { path: '/admin/safe/maintenance',name:'safeMaintenance',role:'4',meta:{side_name:'整改维护',is_show:true}, component: () => import('../views/admin/safe/maintenance.vue') },
                    //         { path: '/admin/safe/plan',name:'safePlan',role:'5',meta:{side_name:'平面图',is_show:true}, component: () => import('../views/admin/safe/plan.vue') },
                    //     ]
                    // },
                    {
                        path: '/admin/labor_contract',name:'labor_contracts',role:'labor_contracts',meta:{is_more:true,side_name:'班组合同管理',is_show:true,img:''},
                        children:[
                            { path: '/admin/labor/plan',name:'laborPlan',role:'1',meta:{side_name:'劳务用工计划书',is_show:true},component: () => import('../views/admin/labor/index.vue')},
                            { path: '/admin/labor/plan/edit/:id',name:'laborPlanEdit',role:'1',meta:{side_name:'劳务用工计划书',is_show:false},component: () => import('../views/admin/labor/edit.vue')},
                            { path: '/admin/labor/contrast',name:'laborContrast',role:'1',meta:{side_name:'劳务比价方案结果',is_show:true},component: () => import('../views/admin/labor/contrast.vue')},
                            // { path: '/admin/labor/contrast/edit/:id',name:'laborContrastEdit',role:'1',meta:{side_name:'劳务比价方案结果',is_show:false},component: () => import('../views/admin/labor/editContrast.vue')},
                            { path: '/admin/labor/contract',name:'laborContract',role:'1',meta:{side_name:'签订劳务合同',is_show:true},component: () => import('../views/admin/labor/contract.vue')},
                            { path: '/admin/labor/contract/edit/:id',name:'laborContractEdit',role:'1',meta:{side_name:'签订劳务合同',is_show:false},component: () => import('../views/admin/labor/editContract.vue')},
                            { path: '/admin/labor/payApply',name:'laborPayApply',role:'1',meta:{side_name:'提交劳务付款申请',is_show:true},component: () => import('../views/admin/labor/payApply.vue')},
                            { path: '/admin/labor/template',name:'laborTemplate',role:'1',meta:{side_name:'劳务承包协议',is_show:true},component: () => import('../views/admin/labor/laborTemplate.vue')},
                            { path: '/admin/labor/template/person',name:'laborpTemplatePerson',role:'1',meta:{side_name:'清帐承诺书(个人)',is_show:true},component: () => import('../views/admin/labor/personTemplate.vue')},
                            { path: '/admin/labor/template/team',name:'laborTemplateTeam',role:'1',meta:{side_name:'清帐承诺书(班组)',is_show:true},component: () => import('../views/admin/labor/teamTemplate.vue')},
                            { path: '/admin/labor/template/temp',name:'laborTemplateTemp',role:'1',meta:{side_name:'清帐承诺书(临时工)',is_show:true},component: () => import('../views/admin/labor/tempTemplate.vue')},
                        ] 
                    },
                    {
                        path: '/admin/labourers',name:'labourers',role:'labourers',meta:{is_more:true,side_name:'劳务管理',is_show:true,img:''},
                        children:[
                            // { path: '/admin/labourers',name:'labourers',role:'1',meta:{side_name:'施工班组',is_show:true}, component: () => import('../views/admin/labourers/construction.vue') },
                            { path: '/admin/labourers/user',name:'labourersUser',role:'2',meta:{side_name:'人员花名册',is_show:true}, component: () => import('../views/admin/labourers/index.vue') },
                            { path: '/admin/labourers/edit/:id',name:'labourersEdit',role:'1',meta:{side_name:'人员花名册',is_show:false},component: () => import('../views/admin/labourers/edit.vue')},
                            { path: '/admin/labourers/attendance',name:'labourersAttendance',role:'3',meta:{side_name:'现场施工考勤',is_show:true}, component: () => import('../views/admin/labourers/attendance.vue') },
                            { path: '/admin/labourers/payment',name:'labourersPayment',role:'4',meta:{side_name:'劳务工资发放',is_show:true}, component: () => import('../views/admin/labourers/payment.vue') },
                            { path: '/admin/labourers/payment/edit/:id/:date',name:'labourersPayEdit',role:'1',meta:{side_name:'劳务工资发放',is_show:false},component: () => import('../views/admin/labourers/payEdit.vue')},
                            { path: '/admin/labourers/bill',name:'labourersBill',role:'5',meta:{side_name:'劳务请账单',is_show:true}, component: () => import('../views/admin/labourers/bill.vue') },
                        ]
                    },
                    {
                        path: '/admin/scattered_material',name:'scattered_materials',role:'scattered_materials',meta:{is_more:true,side_name:'零星材料管理',is_show:false,img:''},
                        children:[
                            { path: '/admin/material/small',name:'materialSmall',role:'2',meta:{side_name:'零星材料采购',is_show:true}, component: () => import('../views/admin/material/small.vue') },
                            { path: '/admin/material/edit/:type/:id',name:'materialEdit',role:'3',meta:{side_name:'材料采购',is_show:false}, component: () => import('../views/admin/material/edit.vue') },
                            // { path: '/admin/material/scene',name:'materialScene',role:'4',meta:{side_name:'项目部现场直接采购',is_show:true}, component: () => import('../views/admin/material/scene.vue') },
                            { path: '/admin/material/reimburse',name:'materialReimburse',role:'6',meta:{side_name:'内部报销',is_show:true}, component: () => import('../views/admin/material/reimburse.vue') },
                            { path: '/admin/material/reimburse/edit/:type/:id?',name:'materialEditReimburse',role:'7',meta:{side_name:'项目部现场直接采购',is_show:false}, component: () => import('../views/admin/material/editReimburse.vue') },
                        ]
                    },
                    { path: '/admin/site_construction/completion',name:'completion',role:'1',meta:{side_name:'资料管理',is_show:false}, component: () => import('../views/admin/completion/index.vue') },
                    // {
                    //     path: '/admin/warehouse',name:'warehouses',role:'warehouses',meta:{is_more:true,side_name:'仓库管理',is_show:true,img:''},
                    //     children:[
                    //         { path: '/admin/warehouse',name:'warehouse',role:'1',meta:{side_name:'库存管理',is_show:true}, component: () => import('../views/admin/warehouse/index.vue') },
                    //         { path: '/admin/warehouse/in',name:'warehouseIn',role:'2',meta:{side_name:'入库管理',is_show:true}, component: () => import('../views/admin/warehouse/ins.vue') },
                    //         { path: '/admin/warehouse/out',name:'warehouseOut',role:'3',meta:{side_name:'出库管理',is_show:true}, component: () => import('../views/admin/warehouse/outs.vue') },
                    //     ]
                    // },
                    // {
                    //     path: '/admin/completion',name:'completions',role:'completions',meta:{is_more:true,side_name:'竣工资料交付',is_show:true,img:''},
                    //     children:[
                    //         { path: '/admin/completion',name:'completion',role:'1',meta:{side_name:'竣工资料交付',is_show:true}, component: () => import('../views/admin/completion/index.vue') },
                    //     ]
                    // },
                ]
            },



            
            {
                path: '/admin/comprehensives/manage',name:'comprehensiveCanages',role:'comprehensiveManages',meta:{is_more:true,side_name:'综合管理中心',is_show:true,img:'',disabled:false},
                children:[
                    {
                        path: '/admin/comprehensive',name:'comprehensives',role:'1',meta:{is_more:true,side_name:'工程综合管理部',is_show:true,img:''},
                        children:[
                            { path: '/admin/comprehensive',name:'comprehensive',role:'1',meta:{side_name:'付款审批',is_show:true}, component: () => import('../views/admin/comprehensive/index.vue') },
                            // { path: '/admin/comprehensive/warehouse',name:'comprehensiveWarehouse',role:'1',meta:{side_name:'出入库审批',is_show:true}, component: () => import('../views/admin/comprehensive/warehouse.vue') },
                            // { path: '/admin/comprehensive/invoice',name:'comprehensiveInvoice',role:'1',meta:{side_name:'甲方开票审批',is_show:true}, component: () => import('../views/admin/comprehensive/invoice.vue') },
                            // { path: '/admin/comprehensive/examine',name:'comprehensiveContract',role:'2',meta:{side_name:'签订材料劳务合同',is_show:true},component: () => import('../views/admin/comprehensive/contract.vue')},
                            { path: '/admin/comprehensive/cost',name:'comprehensiveCost',role:'2',meta:{side_name:'项目成本统计',is_show:true},component: () => import('../views/admin/comprehensive/costs.vue')},
                            // { path: '/admin/comprehensive/approve',name:'comprehensiveApprove',role:'2',meta:{side_name:'审批申请',is_show:true},component: () => import('../views/admin/comprehensive/approve.vue')},
                            { path: '/admin/comprehensive/approval_process',name:'comprehensiveAapprovalProcess',role:'2',meta:{side_name:'审批流程设置',is_show:true},component: () => import('../views/admin/comprehensive/approval_process.vue')},
                            // { path: '/admin/comprehensive/cost/show/:id',name:'comprehensiveCostShow',role:'2',meta:{side_name:'项目成本统计',is_show:false},component: () => import('../views/admin/comprehensive/costShow.vue')},
                            { path: '/admin/comprehensive/cost/ledger/:id',name:'comprehensiveCostLedger',role:'2',meta:{side_name:'项目台账',is_show:false},component: () => import('../views/admin/comprehensive/costLedger.vue')},
                        ]
                    },
                    {
                        path: '/admin/finance',name:'finances',role:'finances',meta:{is_more:true,side_name:'财务部门',is_show:true,img:''},
                        children:[
                            { path: '/admin/finance/salary',name:'financeSalary',role:'1',meta:{side_name:'员工工资发放',is_show:true},component: () => import('../views/admin/finance/salary.vue')},
                            { path: '/admin/finance',name:'finance',role:'1',meta:{side_name:'项目财务付款',is_show:true},component: () => import('../views/admin/finance/index.vue')},
                            { path: '/admin/finance/capitalize',name:'financeCapitalize',role:'1',meta:{side_name:'项目融资台账',is_show:true},component: () => import('../views/admin/finance/capitalize.vue')},
                            { path: '/admin/finance/capitalize/edit/:id',name:'financeCapitalizeEdit',role:'1',meta:{side_name:'项目融资台账',is_show:false},component: () => import('../views/admin/finance/editCapitalize.vue')},
                            
                            // { path: '/admin/finance/reimburse',name:'financeReimburse',role:'1',meta:{side_name:'报销单',is_show:true},component: () => import('../views/admin/finance/reimburse.vue')},
                            // { path: '/admin/finance/opex',name:'financeOpex',role:'1',meta:{side_name:'公司年运营费用',is_show:true},component: () => import('../views/admin/finance/opex.vue')},
                            { path: '/admin/finance/monthEndPay',name:'financeMonthEndPay',role:'1',meta:{side_name:'月底付款',is_show:true},component: () => import('../views/admin/finance/monthEndPay.vue')},
                            // { path: '/admin/finance/reimburse/edit/:id',name:'financeReimburseEdit',role:'1',meta:{side_name:'报销单',is_show:false},component: () => import('../views/admin/finance/editReimburse.vue')},
                            // { path: '/admin/finance/monthEndPay/edit/:id',name:'financeMonthEndPayEdit',role:'1',meta:{side_name:'月底付款',is_show:false},component: () => import('../views/admin/finance/editMonthEndPay.vue')},
                            // { path: '/admin/finance/ledger',name:'financeLedger',role:'1',meta:{side_name:'项目成本管台账',is_show:true},component: () => import('../views/admin/finance/index.vue')},
                            // { path: '/admin/finance/summary',name:'financeSummary',role:'1',meta:{side_name:'员工薪资汇总表',is_show:true},component: () => import('../views/admin/finance/index.vue')},
                        ]
                    },
                    {
                        path: '/admin/hr',name:'hrs',role:'hrs',meta:{is_more:true,side_name:'人力资源部部门',is_show:true,img:''},
                        children:[
                            { path: '/admin/hr',name:'hrInfo',role:'1',meta:{side_name:'员工信息管理',is_show:true}, component: () => import('../views/admin/hr/index.vue') },
                            { path: '/admin/hr/user/edit/:id',name:'hrUserEdit',role:'1',meta:{side_name:'员工信息管理',is_show:false}, component: () => import('../views/admin/hr/edit.vue') },
                            { path: '/admin/hr/cert',name:'hrCert',role:'1',meta:{side_name:'证书管理',is_show:true}, component: () => import('../views/admin/hr/cert.vue') },
                            { path: '/admin/hr/cert/edit/:id',name:'hrCertEdit',role:'1',meta:{side_name:'企业证书管理',is_show:false}, component: () => import('../views/admin/hr/editCert.vue') },
                            { path: '/admin/hr/train',name:'hrTrain',role:'1',meta:{side_name:'员工培训管理',is_show:true}},
                            { path: '/admin/hr/hire',name:'hrHire',role:'1',meta:{side_name:'员工招聘',is_show:true}},
                        ]
                    },
                ]
            },
            {
                path: '/admin/party',name:'partys',role:'partys',meta:{is_more:true,side_name:'企业党建',is_show:true,img:'',disabled:true},
                children:[
                    { path: '/admin/party/member',name:'partyMember',role:'1',meta:{side_name:'党员管理',is_show:true}},
                    { path: '/admin/party/union',name:'partyUnion',role:'2',meta:{side_name:'工会管理',is_show:true}},
                    { path: '/admin/party/joint',name:'partyJoint',role:'3',meta:{side_name:'党建共建',is_show:true}},
                    { path: '/admin/party/welfare',name:'partyWelfare',role:'4',meta:{side_name:'员工福利创收',is_show:true}},
                ]
            },
            // {
            //     path: '/admin/company',name:'companys',role:'companys',meta:{is_more:true,side_name:'企业管理',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/company',name:'company',role:'1',meta:{side_name:'企业管理',is_show:true}, component: () => import('../views/admin/company/index.vue') },
            //         { path: '/admin/company/eidt/:id',name:'companyEdit',role:'2',meta:{side_name:'企业管理',is_show:false}, component: () => import('../views/admin/company/edit.vue') },
            //     ]
            // },
            
            // {
            //     path: '/admin/shanghais',name:'shanghais',role:'shanghais',meta:{is_more:true,side_name:'上海分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/shanghai',name:'shanghai',role:'1',meta:{side_name:'上海分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/xians',name:'xians',role:'xians',meta:{is_more:true,side_name:'西安分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/xian',name:'xian',role:'1',meta:{side_name:'西安分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/fujians',name:'fujians',role:'fujians',meta:{is_more:true,side_name:'福建分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/fujian',name:'fujian',role:'1',meta:{side_name:'福建分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/zhejiangs',name:'zhejiangs',role:'zhejiangs',meta:{is_more:true,side_name:'浙江分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/zhejiang',name:'zhejiang',role:'1',meta:{side_name:'浙江分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/anhuis',name:'anhuis',role:'anhuis',meta:{is_more:true,side_name:'安徽分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/anhui',name:'anhui',role:'1',meta:{side_name:'安徽分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/yunnans',name:'yunnans',role:'yunnans',meta:{is_more:true,side_name:'云南分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/yunnan',name:'yunnan',role:'1',meta:{side_name:'云南分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/guangxis',name:'guangxis',role:'guangxis',meta:{is_more:true,side_name:'广西分公司',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/guangxi',name:'guangxi',role:'1',meta:{side_name:'广西分公司',is_show:true}},
            //     ]
            // },
            // {
            //     path: '/admin/lawyers',name:'lawyerss',role:'lawyerss',meta:{is_more:true,side_name:'法务事业部',is_show:true,img:''},
            //     children:[
            //         { path: '/admin/lawyer',name:'lawyer',role:'1',meta:{side_name:'法务事业部',is_show:true}},
            //     ]
            // },
        ]
    },
    {path: '/admin/login',name:'adminLogin',component: () => import('../views/admin/login.vue'),children:[]},
    
    {path: '/',name:'index',component: () => import('../views/index.vue'),children:[]},

]
  
const router = VueRouter.createRouter({
    scrollBehavior:() => ({ left:0,top:0 }),
    history: VueRouter.createWebHashHistory(),
    routes,
})

router.beforeEach(() => {
	start();
})
 
router.afterEach(() => {
	close();
})

export default router